<?php 
defined('IN_ADMIN') or exit('No permission resources.');
include $this->admin_tpl('header','admin');
?>
<script type="text/javascript">
<!--
	$(function(){
	$.formValidator.initConfig({formid:"myform",autotip:true,onerror:function(msg,obj){window.top.art.dialog({content:msg,lock:true,width:'200',height:'50'}, function(){this.close();$(obj).focus();})}});
	$("#money").formValidator({onshow: "请输入金额变动",onfocus: "请输入金额变动", onCorrect: "输入正确"}).inputValidator({min:1,onerror:"请输入金额变动"}).regexValidator({ regexp:'^\\d{0,7}(\\.\\d{0,2})?$', onerror: "输入格式不正确！" });
	});
//-->
</script>
<div class="pad_10">
<form action="?m=vote&c=vote&a=editoptionmoney&id=<?php echo $id?>" method="post" name="myform" id="myform">
<table cellpadding="2" cellspacing="1" class="table_form" width="100%">
<tr>
		<th width="100">加减 :</th>
		<td>
			<input name="add_or_sub" type="radio" value="1" checked="">&nbsp;加
			<input name="add_or_sub" type="radio" value="-1">&nbsp;减
		</td>
	</tr>

	<tr>
		<th width="100">金额变动 :</th>
		<td><input type="text" name="money" id="money" size="30" class="input-text"></td>
	</tr>
	<tr>
		<th width="100">描述 :</th>
		<td><textarea name="desc" cols="60" rows="6"></textarea></td>
	</tr>
	<tr> 
		<th></th> 
		<td> 
		<input type="submit" name="dosubmit" id="dosubmit" class="dialog" value=" <?php echo L('submit')?> "> 
		</td> 
	</tr>
	
</table> 
</form>
</div>
</body>
</html>
<script language="javascript" type="text/javascript">
function AdsType(adstype) {
	$('#SizeFormat').css('display', 'none');
	if(adstype=='0') {
		
	} else if(adstype=='1') {
		$('#SizeFormat').css('display', '');
	}
}
$('#AlignBox').click( function (){
	if($('#AlignBox').attr('checked')) {
		$('#PaddingLeft').attr('disabled', true);
		$('#PaddingTop').attr('disabled', true);
	} else {
		$('#PaddingLeft').attr('disabled', false);
		$('#PaddingTop').attr('disabled', false);
	}
}); 
</script>
               
<script language="javascript">
var i = 1;
function add_option() {
	//var i = 1;
	var htmloptions = '';
	htmloptions += '<div id='+i+'><span ><br><input type="text" name="newoption[]" size="40" msg="<?php echo L('must_input')?>" value="" class="input-text"/><input type="button" value="<?php echo L('del')?>"  onclick="del('+i+')" class="button"/></span><font color="#FF0000"> *</font><br> </div>';
	$(htmloptions).appendTo('#new_option'); 
	var htmloptions = '';
	i = i+1;
}
function del(o){
 $("div [id=\'"+o+"\']").remove();	
}
function del_old2(o){
	 $("div [id=\'"+o+"\']").remove();	
}

function del_old(id) {
	$.get('?m=vote&c=vote&a=del_option&optionid='+id+'&pc_hash='+pc_hash,null,function (msg) { 
	if (msg==1) { 
	$("div [id=\'option"+id+"\']").remove(); 
	} else {
	alert(msg); 
	} 
	}); 
} 

function load_file_list(id) {
	$.getJSON('?m=admin&c=category&a=public_tpl_file_list&style='+id+'&module=vote&templates=vote_tp&name=subject&pc_hash='+pc_hash, function(data){$('#show_template').html(data.vote_tp_template);});
}

</script>